{extend name="$member_style_layout" /}

{block name="title"}客户购买的商品{/block}

{block name="content"}
<link rel="stylesheet" href="__STATIC__/layui/css/layui.css" media="all">
<link rel="stylesheet" href="__STATIC__/css/pcorder.css">
<div style="margin-bottom:10px;"> 
	 <a href="{:urls('index')}" class="layui-btn {if empty($type)}layui-btn-normal{else /}layui-btn-primary{/if}">全部</a> 
	 <a href="{:urls('index','type=ispay')}" class="layui-btn {if $type=='ispay'}layui-btn-normal{else /}layui-btn-primary{/if}">已付款</a>
	 <a href="{:urls('index','type=nopay')}" class="layui-btn {if $type=='nopay'}layui-btn-normal{else /}layui-btn-primary{/if}">未付款</a>
</div>
{empty name="listdb"}<div style="padding:50px;font-size:14px;">你还没有客户购买商品</div>{/empty}
{volist name="listdb" id="rs"}
<div class="ListOrder">
  <div class="company">
  
    
    <a target="_blank" href="{:get_url('user',"uid=$rs[uid]")}">客户: <em><img src="{$rs.uid|get_user_icon}" onerror="this.src='__STATIC__/index/base/noface.gif'"/></em>{$rs.uid|get_user_name}</a>
	<span>{$rs.create_time}</span>
  </div>
  <ul class="orderinfo">
    <li class="shops">
{volist name="rs.shop_db" id="vs"}
		<div class='list'>
			<div class='listtable'>
			  <div class='img'>
				<a href="{:iurl('content/show',['id'=>$vs['id']])}" target="_blank"><img src="{$vs.picurl}" onerror="this.src='__STATIC__/images/nopic.png'"/></a>
			  </div>
			  <div class='t'>
				<a href="{:iurl('content/show',['id'=>$vs['id']])}" target="_blank">{$vs.title}</a></div>
			  <div class='price'>
				<s>&yen;{$vs._price}</s>
				<span>&yen;{$vs._price}</span></div>
			  <div class='num'>X {$vs._num}</div></div>
		  </div>
{/volist}
    </li>
    <li class="totalmoney" style="font-size:15px;">应付金额<br>&yen;{$rs.pay_money}</li>
    <li class="state">
      <div>
{eq name="$rs.pay_status" value="1"}
  <span style="color:blue;">已付款</span> <br> <br>
{else /}
未付款 <br><br>
{/eq}



</div>
      <div></div>
    </li>
    <li class="action">
      <a href="{:urls('show',['id'=>$rs['id']])}">查看</a>
      <span style='display:;'>
        <a href="{:urls('edit',['id'=>$rs['id']])}">修改</a></span>
       
    </li>
  </ul>
  <div class="otheraction">订单号：{$rs.order_sn}</span></div>
</div>
{/volist}
<div class="OrderPage">{$pages}</div>
<script type="text/javascript">
$('.tui_ding').on('click', function() {
	var url ="{:urls('tui_ding')}?id="+$(this).data('id')+"&type="
   layer.tips('<a href="'+url+'agree" style="color:#fff;">同意退订</a><br><a href="'+url+'unagree" style="color:#fff;">拒绝退订</a>',$(this), {
                 tips: [3, '#0FA6D8'],
                 tipsMore: false,
                 time:5000,
       });
});
</script>

{/block}